Refactor Layout.