@Override
	public Node removeItem(int key) throws EmptyTreeException,
			KeyNotFoundException, InvalidTreeOperation {
		if (isEmpty())
			throw new EmptyTreeException();
		Node item = findItem(key);
		Node next = nextInorder(item);		
		Node removedNode = null;
		if (item == null)
			throw new KeyNotFoundException("Key " + key + " not found !!!");
		else {
			removedNode = super.removeItem(key);
			if (key == 63) {
				if (DEBUG){
					printTree();
					System.out.println("Root: "+getRoot().getKey());
				}
			}
			Node w = null;
			if (item.getLeft() != null && item.getRight() != null)
				w = next;
			else
				w = removedNode.getParent();
			
			Node z = w;
			while (z != null) {
				if (DEBUG)
					System.out.println("Checking for : "+ z.getKey());
				Node temp = z.getParent();
				if (z.calculateBalanceFactor() > 1)
					restructure(z);
				z = temp;
			}
		}
		return removedNode;
	}