Fork of coopernurse's generic-pool, with some refactoring & api changes.