Added undo

The undo button now works correctly. However, it is slightly
ineffiecent because it still stores the move history even when there
are no undos left. I may keep it this way though because I plan on
adding the ability to purchase more undos.