cleaning and adjusting js