Cleaning up settings and storage logic.