Implemented scopes (closes #15).