Reformat layouts js