Full rewrite of the parser. Better use of items and pipelines