Allow to update visibility of a category with the API

Make the code more readable
Merge pull request #927 from Yochima/yochima-branch

Allow to update visibility of a category with the API