minor templates refactoring (using n: macros)