Added scope filtering
Merge branch 'add-scope-filtering'