public ArrayList<Business> search(String term, String location) {
		StickyWebResponse response = null;
		try {
			term = term.toLowerCase();
			location = location.toLowerCase();
			StickyWebRequest request = searchRequest(term, location);

			ArrayList<Business> result = new ArrayList<Business>();
			response = request.execute();
			// TODO: Validate the output here using response.isNull,
			// response.asText, etc.
			if (response.isNull())
				return result;
			if (response.asText().equals("")) {
				System.err.println("No response recieved from the internet. Your internet connection might be down.");
				System.exit(1);
			}
			Map<String, Object> jsonResponse = response.asJSON();
			if (jsonResponse.containsKey("error")) {
				Map<String, String> errorDetails = (Map<String, String>) jsonResponse
						.get("error");
				System.err.println(errorDetails.get("id") + ":"
						+ errorDetails.get("text"));
			}
			Iterator<Object> resultIter = ((ArrayList<Object>) jsonResponse
					.get("businesses")).iterator();
			while (resultIter.hasNext()) {
				result.add(new Business((Map<String, Object>) resultIter.next()));
			}
			return result;
		} catch (StickyWebNotInCacheException e) {
			System.err
					.println("There is no query in the cache for the given inputs. Perhaps something was mispelled?");
		} catch (StickyWebInternetException e) {
			System.err
					.println("Could not connect to the web service. It might be your internet connection, or a problem with the web service.");
		} catch (StickyWebInvalidQueryString e) {
			System.err
					.println("The given arguments were invalid, and could not be turned into a query.");
		} catch (StickyWebInvalidPostArguments e) {
			System.err
					.println("The given arguments were invalid, and could not be turned into a query.");
		} catch (StickyWebJsonResponseParseException e) {
			System.err
					.println("The response from the server couldn't be understood.");
			System.err.println("Recieved: " + response.asText());
		}
		return null;
	}