Add tests for delete confirmation; fix some bugs around entity deletion