Bringing the code in line with modern ruby (1.9.3)