Added methods to delete widgets and their resources.