object pool implementation (not fully tested yet)
- some additional refactoring