Adapted Jens's CBForest update
clean up
add RangeKey
refactor revid
refactor revid class