Added a model to the example, refactored to comply with the fat model / thin controller paradigm