Fixed directory issues

fixed directory issues and backend delete functionality