Put the deletion of a template into a background job

Lots of things happening now...