Some refactoring in ConfigWidget and Application