Add save and quit functions