Updated code to support deploy, undeploy, create and destroy.