Fix for compound attributes, improve paging performance
replace HTML comments with Freemarker comments