Fixing many issues concerning subclasses