Chapter 1 - small refactoring