Allow to update visibility of a category with the API

Make the code more readable