Update code for layouts