Fix sorting, fix html characters in generated pages, update template, include relevant template parts