Add ping implementation

Closes #1