Done PEP8 and comments to confidence.py