Some more work on making the code pyflakes clean