Change Matrix from class to struct.