Tweaks, fixes and PEP8 standard