Fixed the hashing algorithm to use Longs and also added an AHash class