More work on the parser, needs tests