remove globals, extract templateFinder entryPath, add index.test.js