Some style changes to comments. Added some docstrings.