Fixed a few parser errors
Cleaned up the code and added some additional error checking/reporting. Added some new tests. Added support for note durations.