Update yakbot.py

some improvements and cleaning of code