Got settings preservation and restoration working, finally.