numerous cleanups