GUI-552: Fix failing tests; minor PEP8 cleanup