more code cleanups from review