Added remove doc function and