Replace category access objects and add tests

* Category is now accessible as a dict
* Replace dict with a NoneDict (in tools.py)
* Adapt tests for those
* Add some more tests as well