Updating javascript code style