Move require.js main.js to a template

This fixes #89
Merge pull request #90 from passy/require-template

Move require.js main.js to a template