optimized length & remove trailing console.log
code cleanup & more secured adapter
code cleanup; improve discovery lifecycle