Implemented recursiveDelete