Overhauling

Part of the move to more modular and independent, testable functions