Cleaned up the code for links undo