Added saving and loading functionality