some theme refactoring