Code layout and docstrings