GUI-554: Fix reference to missing "queue" var. Remove unused import, and minor PEP8 cleanup