Added a docstring to register_class