Update layout and logic.