Explained highlighting and undo functionality