CommandWriter refactoring.