Trying to make code comply with PEP standards