A bit of cleanup and more decoupling from the primary entity system.