Move scope to mixin, take 2

Supercedes #46