Cleaned up comments and docstrings