Rewrote unused_hash function for better filling. Tree walk works.