now has Scope class and more. Fixes #22