Library changes: add a stringhash function, seperate out the hash used in HashMap