Let bot be importable
Added logging and cleanup
Little bit of testing for bot.py
Reworked shutdown/startup logic to fix shutdown issues