integrate Kim's code to make the html nested so we can make separate pages for each section (esp for the messages book)