Add ping handler
Fixes #38