Clean up template loader