remove trailing whitespace and unused imports

This kind of thing is sometimes a bit contentious but now that you guys have cleaned up the line endings I wonder might you be interested in a few more small cleanups?