Fixes for jnd_article_category table and some optimizations.