remove unused code
minor refactory
update js library