Cleans up if checks a bit