The first set of refactorings to move the code base towards a hexagonal style.