Update layout and fix some issues