Refactoring install.rb