Clean up parser.rb in lots of ways