Move linear algebra constructs (matrix and vectors) into initialization
so they are only constructed once and subsequently copied over.