clean up documentation and ordering in models related to matrix