Adds DEBUG mode.
Merge pull request #6 from jmeas/debug

Adds DEBUG mode.