Set up layout dealing with window resizing