Implement a working (tho ugly) parser.