more docstrings and test style