Rewrite matrix operations to use object system.