js and layout improvements