Fixes to doc and PEP8 compliance