Refactored initialization of themes to simplify some of the initialization logic