S73119 Code to optimize layouts