A little more modularity unclutters index.js