Debug hooks

Improving testability / adding acceptance tests
nit: blank line