clean up javascript in resources