Added support for applying theme