Full refactoring of settings storage.