First implementation of load/save of preferences.