Further work on mat conversion
.