   @model: (names...) ->
     @_require 'models', names...
 
-  @global: (isGlobal) ->
-    return if isGlobal is false
-    Batman.Object.global.apply @, arguments
-
-    instance = new @
-    @sharedApp = instance
-
-    global.App = instance
-
   @_notReady: ->
     @_notReadyCount ||= 0
     @_notReadyCount++

    @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

    controller

Batman.redirect = (url) ->
  SharedApp.redirect url

class Batman.Controller extends Batman.Object
  @match: (url, action) ->
    SharedApp.match url, controller: @, action: action

  @beforeFilter: (action, options) ->
    # FIXME
