Cleanup of IRForTarget.  Removed some relics of
the time when the IRInterpreter ran inside
IRForTarget.
A bit more cleanup on the process_events.py to use best practices for event handling.