Optimization and reformat