Added debug support.

Closes #3.