started discoverability code and cleanup logging