More code cleanup as result of pyflakes