Add support for "scope" parameter

Fixes #1