Finalizing the data structure