More documentation. Docstrings added