private JsonNode getLastTrackNode() {
		JsonNode result = null;

		// setup API url
		URI uri = null;
		try {
			uri = getApiUri().addParameter("method", "user.getrecenttracks").addParameter("user", config.getUser())
					.addParameter("api_key", config.getApiKey()).addParameter("format", "json")
					.addParameter("limit", "1").addParameter("extended", "0").build();
		} catch (URISyntaxException e) {
			LOG.fatal("Configuration error. Invalid API url.", e);
			return null;
		}

		// setup the request
		CloseableHttpClient client = getClient().build();
		HttpGet getRequest = new HttpGet(uri);
		setHeaders(getRequest);

		// execute the request
		CloseableHttpResponse response = null;
		try {
			response = client.execute(getRequest);
		} catch (IOException e) {
			LOG.fatal("Failed to execute request.", e);
			close(response, client);
			return null;
		}

		// read the response
		InputStream responseStream = null;
		JsonNode root = null;
		try {
			ObjectMapper mapper = new ObjectMapper();
			responseStream = response.getEntity().getContent();
			root = mapper.readTree(responseStream);
			LOG.info("Last FM API returned :" + root.toString());
		} catch (JsonProcessingException e1) {
			LOG.fatal("Returned JSON was invalid.", e1);
			close(response, client);
			return null;
		} catch (IOException e1) {
			LOG.fatal("Failed to read response stream.", e1);
			close(response, client);
			return null;
		} finally {
			close(responseStream);
		}

		if (root.hasNonNull("error")) {
			LOG.error("Error returned by API: " + (root.hasNonNull("message") ? root.get("message").asText() : ""));
		} else {
			JsonNode recentTracks = root.get("recenttracks");
			Iterator<JsonNode> tracks;
			if (recentTracks.hasNonNull("track")) {
				tracks = recentTracks.get("track").elements();
			} else {
				// no tracks ever listened to
				tracks = new ArrayList<JsonNode>().iterator();
			}
			if (tracks.hasNext()) {
				result = tracks.next();
			}
		}

		// close stuff
		close(response, client);
		return result;
	}