Lots of cleanup. Removed old unused functions and moved the ThreadTask class to it's own file with a cpp