refactoring around LayoutFrame class