Converted to general version of BucketDB