Refactor setup.rb