clean JS code