@SuppressWarnings("unchecked")
	private void loadWithParams(String courseraUrl, long limit, long start)
			throws IOException {
		String urlStr = courseraUrl + "&limit=" + limit + "&start=" + start;
		URL url = new URL(urlStr);
		InputStream stream = url.openStream();
		InputStreamReader reader = new InputStreamReader(stream);
		this.json = (HashMap<String, Object>) JsonParser.parse(reader);
		stream.close();

		// Extract all universities and categories.
		HashMap<String, Object> map = (HashMap<String, Object>) json
				.get("linked");
		ArrayList<Object> list = (ArrayList<Object>) map.get("partners.v1");
		for (Object o : list) {
			map = (HashMap<String, Object>) o;
			String id = String.valueOf(map.get("id"));
			universities.put(id, map);
			uniIdsByShortName.put((String) map.get("shortName"), id);
		}
		map = (HashMap<String, Object>) json.get("paging");
		map = (HashMap<String, Object>) map.get("facets");
		map = (HashMap<String, Object>) map.get("categories");
		if (map != null) {
		list = (ArrayList<Object>) map.get("facetEntries");
		for (Object o : list) {
			map = (HashMap<String, Object>) o;
			categories.put((String) map.get("id"), map);
		}}

		// Extract courses.
		list = (ArrayList<Object>) json.get("elements");
		for (Object o : list) {
			map = (HashMap<String, Object>) o;
			courses.put(String.valueOf(map.get("id")), map);
		}

		// Attach sessions to the courses. 
		map = (HashMap<String, Object>) json.get("linked");
		list = (ArrayList<Object>) map.get("onDemandSessions.v1");
		for (Object o : list) {
			map = (HashMap<String, Object>) o;
			HashMap<String, Object> course = courses.get(map.get("courseId"));
			if (course == null) {
				System.err.println("Have session without a class: " + map);
				continue;
			}
			ArrayList<Object> sessions = (ArrayList<Object>) course
					.get("sessions");
			if (sessions == null) {
				sessions = new ArrayList<Object>();
				course.put("sessions", sessions);
			}
			sessions.add(o);
		}
	}