Minor code cleaning to remove pyflakes warnings