Refactor : code more compliant with the ruby-style-guide