Refactor request parser.