Changed the main thread created in start() to run in daemon mode.