Refactored to separate applying the theme from loading the themes.