[WIP] Fix ht interface

Resubmit from #105 onto master
Why not `int`?