fixed bug in json generation, where topics were being added redundantly.  Also, now sort the topics.