Some more refactoring got done:
Fairly pleased with some of the results