Refactor

Code changes for deletion of VM