Cleaned up if and cond statements