Avoid attaching scope reference to variables
Add test for ScopeLinker
Implement ScopeRegistry