fix: run params autocomplete command only when selection is empty
fix: uniform tabs/spaces indent
fix some pep8 and pylint warnings
fix daemon.py: don't use global variables in __main__ code