Add some docstrings and notes.