Started the thread code, added pool code

Starting to copy over the old engine code and clean it up