Bug fixes & Model Matrix class