Some client side refactoring towards composition root pattern.