Added saving, largely untested