chore(thewire): few code enhancements in the wire js file