Refactoring code to prepare for Chapter 4

I don't really see the point in labeling everything in this book
by chapter, since it's really one app that's being built... oh
well.

Signed-off-by: Elliot Voris <elliotfriend@gmail.com>