Add matrix adaptors and addapted to the now rust features.