Converted some comments to docstrings, and added some others.