Cleans up javascript.