Core javascript functionality for StoryJS (including TimelineJS)