Updated javascript example. Rest of examples will nor work yet, need to fix them.