Parser refactor; additional tests for Parser and Lexer