Improvements and fixes for templates

- improvement of he UI aspect and usability
- introduction of a "cache" map to fulfill the first objective
- fixed the conditional blocks' regex