Educational code I wrote in 2012