Updates class to run as a thread
Merge branch 'threads'