Refactor BucketListingRef to make it more polymorphic.