Fluid layout

Took over pr #1051 from @cohitre

Fixes #1050