Apply pyflakes fixes to the code base