model2: refactoring
model2: tests for template resolver