continued cleanups and decoupling from rk