Refactored parser a bit to remove a special case.