move setup-oriented methods from application.rb file, remove non-public banginess