Minor code cleanups - left from previous patches

few minor changes that should have been part of previous commits