Layouting information with flows and stacks