Undo and redo partially implemented

Redoing the way state manipulations happen so that I can succesfully not
worry about a lot of things