Change block definitions.
Added a matrix multiplication utility function.