index.js template named functions

for easier debugging
Merge pull request #9 from joeybaker/patch-4

index.js template named functions