Added docstrings
Fix tests