[WIP] Fix ht interface

This PR is for fixing the hashtable interface. **I also changes the public interface.**