perf(scope): misc optimizations

Closes #610