                         error: =>
                             deferred.resolve()
 
+        addServices: (services) ->
+            sm.resolveImmediately()
+
         setService: (service) ->
             @services.set []
             @addService service

                sm.resolveImmediately()

        renderUnitsByServices: (serviceIdString, queryParameters) ->
            serviceIds = serviceIdString.split ','
            municipalityIds = queryParameters?.municipality?.split ','
            deferreds = _.map serviceIds, (id) =>
                @addService new models.Service(id: id), municipalityIds
            return $.when deferreds...

        _fetchDivisions: (divisionIds, callback) ->

    'backbone.marionette',
    'URI',
    'cs!app/base',
    'cs!app/models',
    'cs!app/analytics'
],
(
    $,
    Marionette,
    URI,
    sm,
    Models,
    Analytics
) ->

    PAGE_SIZE = appSettings.page_size
