Added a lot of docstrings