Remove a lot of unused imports

First step to add automated pyflakes check.