updated properties and js

upade of js script to allow properties update and better js code