Fix sidebar, header, and footer, and add regression test.