Improved implementation of musicparser.rb to make it much cleaner and more organised