Parser refactor