Initial working implementaion of Pool (after lots of debugging).