Refactors parser.