refactored a bit and made the settings exportable