Generalize parser, simplify output