Layout refactory