clean up Parser.java a bit