Game thread update and generation functionality added. A couple of small bug fixes and general cleanup.