Added Docstrings to functions

These may need some love...