code cleanup with pyflakes

as stated, just cleaning up where I can.