Refactoring
Separating the bot from the socket