Started (and somewhat finished) a first revision of the implementation
of the new undo method in model.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>