refractored parser
Merge pull request #3 from octopuscabbage/parser

refractored parser