Added pre and post-game threads. Added searching for existing gamethreads. Some cleanup. Some bugfixes.