Improvement into templates, now uses variables

Just that!