Cleanup and actual #89 fix

Sorry @nhmood but it didn't work :(. I have my changes that do work and did some general ruby cleanup for parser.rb (ruby-fy it!)