Refactor ParseError