refactored random vector source
fixed a couple of typos in matrix package
improved vector package docs