try to preserve other matrix variables

Two things I'm not sure about:

-Does it make sense to arbitrarily preserve the line number of other matrix variables? They might not make sense anymore.
-Can I actually do what I did in the map function?
Comment can go outside of the function definition.  It's basically documentation on the API, not really internal details.