Improve Up/Down key interaction
correct some pylint warnings