Fix bug in getHKey
Implement memoized treeDist function
Expose new dist function
Random console.log changes