Refactoring ParserUtil class