Refactored routes.rb