Generify templates and provide tested template support
Fix test
Tests for nested templates