Optimize metadata order