Fixed bug with templates of inactive themes
Added support for wrapper elements, closes #3