Enhancements to sweeper to better support Gobblin data

I cleaned this up, you're right, it was confusing :)