Some useful methods for ListView.
Add the logic for adding categories.

Note this doesn’t work yet and raises an exception. I just wanted
to commit this.