Added a MatrixStack class