Code now conforms better to PEP8