refactored main.py
changed way keylistener works.