Mostly translation, some new code in setdb.go for handling bucket size and iterating over an entire bucket.