ParserFactory: refactoring