Categories service, split up code