fix docstrings, headers and imports