pyflakes fixes. Added some six imports where necessary, removed unused imports in other places