Complete chapter 3
Moved 'fortune cookie' functionality into a module.