Krzysztof,
Thanks for sharing your source code! It's clean and easy to read.
Not sure whether you are still working on it, but I think it should be better to use some database for the objects, so some future API can use it as well. Hence I have created this issue.