Added type to addMenuItems method...

used for undo so it can also be used for redo