fixed some pointer issues and logic quirks
added a little testing program for the basic midi-message logic