Added some logging and simpler hashing implementation.