[Olena-patches] milena r1141: Add matrix handling and rewrite of vectors