Add functionality to limit the depth of the category graph