begin refactoring into more general command, processor and dispatcher components