Add docstrings, fix import order