Further modifications to layout and js