Formatting code
Test behavior changes
Fix bugs in tests (WIP)

py.test reporting doesn't really work in threads.