Added debug mode.

This address issue #20.