MatrixAdapter

rename HackyMatrix to MatrixAdapter and move it to a separate file.  also add a test