Re-implemented paste and undo