Cleaned up comments and docstring.