cleanups and corrections