Add debug scope
Correctly parse reference lists
Merge pull request #2 from clarkgr/master

Correctly handle references