extract Thread classes into own files