Extract .root_class method