various fixups and cleanups