Some work on the layout manager