Change types and function signatures to reflect the fact that varint is unsigned