Report uninitialized references
Tests to clear #218

 I also introduced some refactorings in the tests along the way.
Rebase fix
Typo
Merge pull request #221 from jponge/bug/218

Report uninitialized references

Fixes #218