Added clib m4ri and fixed linear functions.