Added deleting functionality

Needs more testing and doesnt delete all files