Adding an error message and some comments

Error message is displayed when there are no more moves to be undone.
Also, adding a few comments so we know what the code does later on.