Made daemon threads, cleaned up other cruft. Threads now work