add support for themes and fix issues