Debug hooks

Improving testability / adding acceptance tests
All using statements should be inside or outside the namespace