Clean up javascript file