Added threadTasks.cpp, some more minor fix stuff