Bind various scopes to their corresponding types

This gives better automatic scope resolution.
Merge pull request #490 from JasonGross/bind-scopes

Bind various scopes to their corresponding types
./autogen.sh