Refactor the clidriver event system