cleanup the js lib; include head js