More robust detection of docstrings in classes and instances

Also, handles fibrous functions better