Cleanup template handler;