XD-956: Parser refactoring