reorganization and minor type-safety

just some tidying and reorganizing as I seek to understand bit stuff and the MIDI spec