Improve scaling: Don't add a rounding factor where one's not wanted.

Old way was brokenish.
Reduce memory usage of quantization.
Header protection
Rename for consistency.
Bug fix in kd-tree building: Don't split entirely to the left.