Parse if internal refactor