more cleanups and manager improvements