Threadpool

Part of #4 issue.
Done