Added support for scope as a Proc

Includes addition of new tests