Fix Pool object and implement basic unittest for it