clean up handling of references to lists and dicts
4 files changed