Restructuring to use a separate hashing module