change the parser to a constructor model. Improve tests, add before each block to avoid weird behavior