Minor refactoring in Parser