Added switch to disable/enable discovery

And added methods to set/get the discoverer object.