Implemented functionality to combine adjacent hashes and rehash. Number of hashes to combine taken as parameter.