finally figured out how to share memory references

this will allow the linerepmap and the dotrepmap to change together, so
that I can have it all! (selfish, I know)