Fixed timeout values being adjusted incorrectly
Moved threads.lua into its own folder, in preparation for splitting up
Split into different modules inside of a package. Created a folder for tests and a script to run all of them.