Mapping now takes the resolver as constructor argument

removes some duplicate code from Scope