Fixed documentation and warnings
Fixed flake8 warnings