First phase of layout