Fixed the category edits. now removes empty cats