Feature lattice2

I have addressed the issues. Can you all take another look.Thanks.
My preference is to use `DataContainer(data)` which also has an optimized path for coping dictionaries. Using `deepcopy` while not wrong is usually doing more operations and thus slower than needed and I rarely see it in python code. 

>  BTW: is it customary in Python to first delete the old object before overwriting the reference?

In general there is no need to delete old objects. Objects are garbadge collected based on reference counts and thus they should be automatically cleaned-up as soon as there is no reference to them.