Finish refactoring the layout