Adds ReDoD protection to white term add commands and all edit commands. Refactors CommandProcessor.