Refactored LayoutBox