Extract matrices logic to id-chars,id-length,id-re,rand-matrix-id.
Extract matrices logic to id-chars,id-length,id-re,rand-matrix-id.

Clean up logic throughout matrices, extracting to new structures.

tiredpixel/mtrx9