Refactored parser.