code reorganization for implementing settings dialogs