Cleaning up javascript.