Sorted code by data type and commented it all.

I also renamed some functions to make more sense. For example,
TransformM3() and HTransformM4() are now called LinMapV3() and
AffineMapV3() respectively, since that describes what they do much
better.