Add some comments and docstrings
Clean up, some comments and docstrings