Code written following 'Discover Meteor' by Coleman and Greif