Consolidating this with deleteresource widget