Implementing undeploy and delete