legacy fixes, cleanup