Use faster hash function, and a few other tweaks