Refactored undo partially and added action class
Refactored undo
View draw the actual undotree