Reworked the CPU/PPU handoff code to use a threading.Condition instead of a threading.Event. Cleaned up legacy code with poor formatting.