Changes ti get categories. Added a new way of getting categories