Added skeleton of layout algorithm