cleanups and hacks