Update from uncommited code in the sandbox.
make doc generation work.
Added disconnect on destructor.