Added command stack saving and loading.