Cleanup template resource