Undo functionality and current cell highlighting