define(['jquery', 'underscore', 'backbone',
	'text!./app/views/templates/main.html',
	'text!./app/views/templates/item-listing.html',
	'text!./app/views/templates/item-listing-empty.html',
	'models', 'utils', 'facebook'
], function($, _, Backbone, mainTemplate, itemListingTemplate, itemListingEmptyTemplate, Models, Utils) {
	var Views = {};
	Views.Main = Backbone.View.extend({
		initialize: function() {
			this.$el.html(_.template(mainTemplate, {}));
			this._setUpCollections();
		},

		_setUpCollections: function() {
			var userId = this.options.userId;
			yourCollection = new Models.Wants([], {
				url: '/service/me/wants'
			});
			friendCollection = new Models.Wants([], {
				url: '/service/me/friendsWants'
			});
			featuredCollection = new Models.Wants([], {
				url: '/service/me/recommended'
			});
			publicCollection = new Models.Wants([], {
				url: '/service/public/wants' // I don't think this exists, but hey.
			});

			yourView = new Views.ListingView({
				collection: yourCollection,
				el: document.getElementById('you-section'),
				id: "you",
				'userId': userId
			});

			friendView = new Views.ListingView({
				collection: friendCollection,
				el: document.getElementById('friend-section'),
				id: "friend",
				'userId': userId
			});

			featuredView = new Views.ListingView({
				collection: featuredCollection,
				el: document.getElementById('featured-section'),
				id: "featured",
				'userId': userId
			});

			publicView = new Views.ListingView({
				collection: publicCollection,
				el: document.getElementById('public-section'),
				id: "public",
				'userId': userId
			});
		}
	});

	Views.ItemView = Backbone.View.extend({
		template: _.template(itemListingTemplate),

		initialize: function() {
			this.listenTo(this.model, "change", this.render);
			this.id = "item-" + this.model.attributes.id;
		},

		render: function() {
			this.$el.html(this.template(this.model.attributes));
			return this;
		}
	});

	Views.ListingView = Backbone.View.extend({
		initialize: function() {
			this.listenTo(this.collection, 'add', this.collectionAdded);
			this.listenTo(this.collection, 'change', this.collectionChanged);
			this.listenTo(this.collection, 'remove', this.collectionRemoved);

			this.childViews = [];

			this._addAllModels();
		},

		render: function() {
			var fragment = document.createDocumentFragment();

			if (this.childViews.length > 0) {
				_(this.childViews).each(function(currentView) {
					fragment.appendChild(currentView.render().el);
				});
			} else {
				$(itemListingEmptyTemplate).appendTo(fragment);
			}

			this.$('.item-listing').html(fragment);
			return this;
		},

		collectionAdded: function(item) {
			this._addViewForModel(item);
			this.render();
		},

		collectionRemoved: function(item) {
			this.childViews = this.childViews.filter(function(view) {
				return view.model.id !== item.id;
			});
			this.render();
		},

		collectionChanged: function() {
			this.childViews = [];
			this._addAllModels();
		},

		_addViewForModel: function(item) {
			this.childViews.push(new Views.ItemView({
				model: item
			}));
		},

		_addAllModels: function() {
			var that = this;
			this.collection.each(function(item) {
				item.set({userId: that.options.userId});
				_addViewForModel(item);
			});
			this.render();
		}
	});

	return Views;
});
@@ -2677,32 +2677,96 @@
 unction(item) %7B%0A
+%09%09%09var that = this;%0A%09%09%09item.set(%7BuserId: that.options.userId%7D);%0A
 %09%09%09this._addView

Add userId to individual models as they are added to the collection.