Even faster version of y_hooks code!

Rewrote y_unique for more numbers and better searching.