Updating generated Javascript code