remove the last references to matrixlib

+ cosmetic fixes