Add more efficient make_hashtable function