Updates to javascript example for new library