small cleanups to code