A more functional approach to app.rb's innards.