Simplified everything in a class template.