Cleanup the code
Add more documentation
Allow a custom configuration to be passed into the bot