Implemented Undo

Implemented Undo feature, along with some brushing up of FEN stuff.