Bugfixes and working from the PEP8 guidelines
Fix merging