Change Matrix constructor so that it can accept configuration object.