PEP8 & minor fixes