Cleaned up leftover debug code, added more events.