Moved matvecmod to top to avoid dependency issue