Renaming in the ruby file, and some slight refactoring