Refactor generic setup mixin for easier reuse/overriding.