namespace the api controllers. fix a bug in app.rb. remove unused helpers