Refactor node templates creation