Wrote some docstrings.