Get rid of testing code, fix threading so ctrl+c works