Changed method of docstring sorting.