Fixes and suggestions
Add docstrings

and others small fixes.