more code cleanups