Fixed hyperdist - I think max needs cast to protect unsigned wrap issues.
Shuffled and fixed binary IO testers.