Started to refactor parser