Refactoring Themes-manager