Updated documentation to docstrings, added many documenting comments, raised some TODO concerns.