Code for the fourth chapter of Meteor in Action