Modified code layout to adhere to PEP8 recommendations