Make handlers.py pass PEP8 and pyFlakes