Finished parser
Refactor regexp out a bit