Change threads to runnable

In order to have a more modular approach to parallel execution, all direct uses of threads have been changed to using runnables wrapped in a unchanged thread object.