Fix commenting convention, turn comments into docstrings.