Move settings saving to persistance