 		else
 			view = object
 		
-		if i is @listViews.length
+		if i is @views.content.length
 			view.appendTo(@el)
 		else
 			view.el.insertBefore(@listViews[i].el)
-		@listViews.splice(i, 0, view)
-		@views[_.uniqueId('lvi_')] = view
+		@views.content.splice(i, 0, view)
 
 class lrs.LRSView.views.LRSListItemView extends lrs.LRSView
 

		#console.log @, viewEls
		for view in viewEls
			$view = $(view)
			if !$view.attr('data-view') then continue
			info = $view.attr('data-view').split(':')
			$view.removeAttr('data-view')
			#console.log info[0] || info[1], viewEls, '1'
			if (info.length == 1)
				@views[info[0]] = new lrs.LRSView($view, null,  @)
			else
				@views[info[1]] = new lrs.LRSView.views[info[0]+'View']($view, {subTemplate: info[2]}, @)

			if info[0] == 'view' then @view = @views[info[0]]
			else if info[1] == 'view' then @view = @views[info[1]]

	_createOutlets: ->
		outletEls = @el.find('[data-outlet]')

class lrs.LRSView.views.LRSListView extends lrs.LRSView

	initialize: (content = null) ->
		unless @permanentContent
			@permanentContent = @el.children()
			@permanentViews = _.clone(@views)
			delete @permanentViews.content
			@permanentViewsArray = (view.el[0] for name, view of @permanentViews)
		
		super()
		
		if content and @views.content
			@setPreloadedContent(content)
		else
			@setContent(content)
		
	setPreloadedContent: (content) ->
		previousView = null
		for object, i in content
			@content.push(object)
			
			view = null
			for v in @views.content
				if v.el.attr('data-id') is object.id
					view = v
					break
					
			if view
				view.initialize(object)
			else
				view = new @options.itemClass(null, null, @).initialize(object)
				if previousView
					view.insertAfter(previousView.el)
					@views.content.splice(i, 0, view)
				else
					view.appendTo(@el)
	
				
			#@views[_.uniqueId('lvi_')] = view

	setContent: (content) ->
		return if not _.isNull(content) and not _.isArray(content)	
		return if content is null and @content = []
			
		@views[name] = view for name, view of @permanentViews
		@views.content = []
		@el.children().not(@permanentViewsArray).remove()
		
		if content is null
