Added template tab to enable editing of output and if no name is specified the documents file name will be used by default, minus extension and any _ replaced by spaces and per feature requests #8941 and #8942. Made category name appear in admin table rather than ID. Plus a few minor bug fixes.