Add tests/clean up the Bot API.