Layout refactor