Introduce template 'if' and 'repeat'