-Made some changes to thread.c that will hopefully fix rendering problems
-Reorganized some code
-Rewrote logfile code so it logs directly to the file (no overflows)
-Other small optimizations
This hasn't been tested, and I'm not sure if pausing and resuming DrawCogThread won't cause problems