ELDAR PATCH: Refactoring for theme compilation