Python 3 and PEP8 compatibility