a bit of layout refactoring