Add and improve docstrings, JSON dumping and duplicate removal generalised
Improve docstring for add_cell
Fix to incorporate a more generalised duplicate removal and JSON dump to string