'return' template provider, cleanup