Refactor server out of the bot for web submissions