Debugged GetCategoryChildren + moved accordian code to a function to be called when the treeview is updated.