Master nutty optimizelayout