Delete function

Almost finished for folders.