Added a utils.js
Updated demos to make them simpler.