     controller
 
 Batman.redirect = (url) ->
-  App.redirect url
+  SharedApp.redirect url
 
 class Batman.Controller extends Batman.Object
   @match: (url, action) ->
-    App.match url, controller: @, action: action
+    SharedApp.match url, controller: @, action: action
 
   @beforeFilter: (action, options) ->
     # FIXME

    @run() if @_ranBeforeReady

  @run: ->
    if @_notReadyCount > 0
      @_ranBeforeReady = yes
      return false

    global.App.run()

  constructor: ->
    super
    @dataStore = new Batman.DataStore

  run: ->
    new Batman.View context: global, node: document.body

  @model: (names...) ->
    @_require 'models', names...

  @_notReady: ->
    @_notReadyCount ||= 0
    @_notReadyCount++
