Refining of app.rb