refactor scoping
Merge pull request #11 from jlambert121/scope_refactor

refactor scoping