private AVLEntry<K, V> removeElem(AVLEntry<K, V> top, K key) {
		if (top == null) {
			throw new NoSuchElementException("Attempting to remove item that doesn't exist.");
		}
		
		int comp = key.compareTo(top.getKey());
		if (comp == 0) {
			top = deleteElem(top);
			size--;
		} else if (comp > 0) {
			top.setRight(rebalance(removeElem(top.getRight(), key)));
		} else {
			//comp < 0
			top.setLeft(rebalance(removeElem(top.getLeft(), key)));
		}
		return rebalance(top);
	}