Write story.js and integrate with JS template