Major fixes to layout