cleanliness and coverity fixes.