change js to working version
add fixes from A. Utkin
add files