Update the layout and fix some problems with the size of margins