Remove unused or redundant code.
Add ping functionality for contacting hub.