Added seperate thread classes and handlers