Refactored ThemeManager