Fix references
Add getting template by name