each, if and else cleanups