Moved settings reading an writing to their own methods.