Use a better variable name and tighten up some conditions.