add configurable depth and sort

Only implemented boolean for sort, not function.  Still, very worth it to me and my developers for what we need.