double check hashing, style tweaks