code cleanups (may break things)