Rewrote code for Edit's undo, seems like it is working now, trying to iron it out
Changed the error messages
Added print statements to check for discrepencies