Refactoring work already done to be more isolated and modular