Add debug flag. Closes #2.