cleaning javascript