add support for multiple scopes and fix a datamapper issue [sorta]