Prevent NPE on missing templates and Polish

A minor patch:

- Prevent NPE when having a wrong template name in the configuration
- Polish styles of our new features and tests