Switched to using Matrix and DirMatWrapper