Refactor templates creation in the rest of files