Midi Output module cleanup. Fixes #163
Fixes #147