Still debuging and testing. Added auto rehash.