Small fixes and added a lot of docstrings