Add docstrings and bird's-eye overview of process