Added saving of categories