* Merge consecutive commands of the same type in close succession