Move main() out of the directory with tests.

Relates #160.
Add dummy macro for messages during testing.

Also minor coding style adjustments.

Relates #160.
Migrate ping-pong test to new framework.

Relates #160.