Make the device thread a daemon.
Separated out the tests into their own files.