TRIBS-101 and other fixes when formatting categories and case_notes