Calculating the layout. This may take some time...