Good idea with the matrices. Just keep in mind that if before you didn't use lists, matrices can be extremely huge.
(a 50x55 matrix takes the entire RAM if I remember) I doubt you need extremely large matrices, though. Just make sure the user knows he needs lots of RAM. When storing an entire matrice, it copies all of it in Ans, so you need double the amount of RAM to store it.