Fixing classes and templates