 #############################################################################
 
 class WikiEditController extends WikiDetailController
-    loadInitialData: ->
-        deferred = @q.defer()
-        params = {
-            pslug: @params.pslug
-        }
-
-        promise = @repo.resolve(params)
-
-        promise.then (data) =>
-            @scope.wikiId = data.wikipage
-            @scope.projectId = data.project
-            return data
-
-        promise.then(=> @.loadProject())
-               .then(=> @.loadUsersAndRoles())
-               .then(=> @.loadWikiLinks())
-               .then(=> @.loadAttachments(@scope.wikiId))
-
-        params = {
-            pslug: @params.pslug
-            wikipage: @params.slug
-        }
-
-        promise2 = @repo.resolve(params)
-
-        promise2.then (data) =>
-            @scope.wikiId = data.wikipage
-            return data
-
-        promise2.then => @.loadWiki()
-        promise2.then null, =>
-           @scope.wiki = {
-               content: ""
-           }
-
-        return @q.all(promise, promise2)
-
     save: ->
         onSuccess = =>
             @confirm.notify("success")

            @scope.projectId = data.project
            return data

        promise.then null, =>
            @location.path("/project/#{@params.pslug}/wiki/#{@params.slug}/edit")

        return promise.then(=> @.loadProject())
                      .then(=> @.loadUsersAndRoles())
                      .then(=> @.loadWikiLinks())
                      .then(=> @.loadWiki())
                      .then(=> @.loadAttachments(@scope.wikiId))


            @scope.membersById = groupBy(project.memberships, (x) -> x.user)
            return project

    loadWikiSlug: ->
        params = {
            pslug: @params.pslug
            wikipage: @params.slug
