Refactor commit moving client code into a more modular structure.