Added the beginnings of an undo feature.