Code for chapter 05 of Meteor in Action