Undo button functionality Issue #40