correct class docstring assignment. some refactoring.