Parser internal refactor