Code Refactoring of Martin Flower's example from the chapter 1