Finished code for the Hopkins course, April 2014