Minor improvements in MidiHandler