Fixed many bugs in ths-pool. example-pool.js as a test CLI