refactors to use controllers in lieu of app.rb