Only load Template class when needed