Custom matrix handler and more