Make Engine MIDI event extensible, some misc cleanups