             @get 'archived'
 
 
-    class ContextCollection extends c.Backbone.Collection
+    class ContextCollection extends base.Collection
         model: ContextModel
 
         url: ->

        return new klass(attrs, options)


    class ContextModel extends c.Backbone.Model
        url: ->
            if @isNew() then return super
            return @get('_links').self.href

        constructor: (attrs, options={}) ->
            @root = new nodes.BranchNodeModel

            super(attrs, options)

        initialize: ->

            @on 'request', ->
                @pending()
                c.publish c.CONTEXT_SYNCING, @

            @on 'sync', ->
                @resolve()
                c.publish c.CONTEXT_SYNCED, @, 'success'

            @on 'error', ->
                @resolve()
                c.publish c.CONTEXT_SYNCED, @, 'error'

            @on 'change', ->
                c.publish c.CONTEXT_CHANGED, @

            c.subscribe c.CONTEXT_PAUSE, (id) =>
                if @id is id or not id and @isSession()
                    @pending()

            c.subscribe c.CONTEXT_RESUME, (id) =>
                if @id is id or not id and @isSession()
                    @resolve()

            c.subscribe c.CONTEXT_CLEAR, (id) =>
                if @id is id or not id and @isSession()
                    @clear()
