clean the js code