Added Switch statement and filler 3 commands

Switch statement to CommandGenerator for readability and easier code
editing.
Filler 3 commands to be done.
Extracted updateUndoAndRedoStacks for readability.