clean up javscript