Add some sync protection to add()
Improve the doco.