add matvec method
moved all libmatrix functions to LibMatrix class
streamline test function
modularize