added undo button (finishing work from Adrian?) and redo (not yet working). added check for gi version when importing.