         invitation: "/invitation/%s"
         admin: "/project/%s/admin/%s"
         attachment: "/media/attachment-files/%s/%s/%s"
-
-    conditionalUrl = (url, raw) ->
-        return url if raw
-        return "/##{url}"
-
-    # TODO: refactor this.
+    }
+
     $rootScope.urls =
         projectsUrl: ->
             return '/#/'


    $gmUrlsProvider.setUrls("api", apiUrls)


init = ($rootScope, $location, $gmStorage, $gmAuth, $gmUrls, $i18next, $gmConfig, localconfig, $data, $log, $favico) ->
    $rootScope.pageTitle = ""
    $rootScope.auth = $gmAuth.getUser()

    $rootScope.constants = {}

    $rootScope.constants.usStatuses = {}

        $gmStorage.clear()
        $location.url("/login")

    # FIXME: the following next two event assignations
    # related to i18n seems need a refactor ;)

    $rootScope.$on "i18n:change", (event, lang) ->
        if lang
