private void collectCategoryChanges(CourseModel model,
			ArrayList<Change> list) {
		HashSet<String> newIds = new HashSet<String>();
		for (Object id : this.categories.keySet()) {
			newIds.add((String) id);
		}
		for (DescRec rec : model.getCategories(Source.COURSERA)) {
			if (!newIds.contains(rec.getId())) {
				list.add(DescChange.delete(DescChange.CATEGORY, rec));
			} else {
				HashMap<String, Object> map = this.categories.get(rec.getId());
				String newName = (String) map.get("name");
				if (Change.fieldChanged(rec.getName(), newName)) {
					list.add(DescChange.setName(rec, newName));
				}
			}
			newIds.remove(rec.getId());
		}
		for (String id : newIds) {
			HashMap<String, Object> map = this.categories.get(id);
			list.add(DescChange.add(DescChange.CATEGORY, Source.COURSERA, id,
					(String) map.get("name"), (String) map.get("description")));
		}
	}