Client refactor - Chapter 9