Test case for reverting page to an earlier state

Also improved (and more verbose) error messages etc.