Added some docstrings/fixes