Micro cleanups

remove unused local vars
simplify logical statement