More work on restarting the bot. It restarts but it doesn't actually restart to a working state yet.