The signature for read/write map functions now accepts a void pointer so that we can pass in the machine that those functions may need to know about. This is a bit hairy, but allows us to avoid the need for a yet-uglier global variable.