   'cs!gh-book/opf-file'
   'cs!gh-book/binary-file'
   'cs!gh-book/welcome-sign-in'
+  'cs!gh-book/remote-updater'
   'less!styles/main'
   'less!gh-book/gh-book'
-], ($, _, Backbone, Marionette, logger, session, allContent, mediaTypes, XhtmlFile, OpfFile, BinaryFile, WelcomeSignInView) ->
+], ($, _, Backbone, Marionette, logger, session, allContent, mediaTypes, XhtmlFile, OpfFile, BinaryFile, WelcomeSignInView, remoteUpdater) ->
 
   # Stop logging.
   logger.stop()

              repoName: repoName
              branch:   branch

            allContent.reload()
            @goWorkspace()


          # TODO: Move this into the controller
          goWorkspace: () ->
            setDefaultRepo()
            remoteUpdater.start()
            .fail((err) => alert('There was a problem starting the remote updater. Are you pointing to a valid book?'))
            .done () =>
              allContent.load()
              .fail((err) => alert('There was a problem loading the repo. Are you pointing to a valid book?'))
              .done () => controller.goWorkspace()
          goEdit: (id)    ->
            setDefaultRepo()
            remoteUpdater.start()
            .fail((err) => alert('There was a problem starting the remote updater. Are you pointing to a valid book?'))
            .done () =>
              allContent.load()
              .fail((err) => alert('There was a problem loading the repo. Are you pointing to a valid book?'))
              .done () => controller.goEdit(id)


        Backbone.history.start
