Code examples based on the book Refactoring.