Also improved get_class by using importlib instead of complicated climbing through the whole module tree.