Wrote docstrings everywhere.