/dev/random is WAY too slow. prefer /dev/urandom instead.
Quick and dirty polling thread utility. Only suitable for test at the moment.
Minor fixes for discovery.