Factored out and cleaned up all the stuff about vectorization scale
factors, plus a lot of previously mssing documentation.