Rework to import from folders declared in JSON

rework functionality of the module to create a templates file using the contents of folders declared in an external js file.