Tidy up some of the Ruby from #137.