Rework save preferences