Clean up: remove unused variables (identified by pychecker and pyflakes)

Just doing some minor cleanup.