some minor code cleanups