Implement debug closes #6