Move layout computation to LayoutInfo class. Test WIP