More restructuring

Some more restructuring, back to _legacy clean up tomorrow.