no https for demo
convert indentation to spaces
add a 2-clause BSD license
jshint, use strict, wrapper fn
add package.json
simplify code a bit