refactored tests for linear system solvers
added Mod Function for vectors/matrices (asked by Luc Trudeau)