Apply PEP8 style guidelines

Original version violates probably every PEP8 style guideline. I changed code
formatting to make its layout more common.