Separating --delete as a subcommand and adding resource type filtering

`index` is not needed in the body of the `for`...