Tidy up for use with ruby 1.9.3