scopes were off-by-one; clean up members of scopedsymbols; refactor.