some minor code changes, mostly cleanups