few code cleanups