Working version (though needs cleanup), with basic demo.sh