Fixed hashing bug and added testing class