Finalization, cleaning, optimizing, changed output structure