added undo function to cut and paste, moved click menu into main class