Clean up hash fragment handling code