Refactor CommandPlugin and MarkovPlugin.