Tidy up ping module. UNTESTED.