remove dead javascript code