Make parsers more object-oriented