move content out of app.rb and into separate models