Refactor layout.