Complete HashPSQ implementation