Changed events

Changed onundo and onredo to be called with arguments for each action.