Added Command Pattern up to first version of undo method