Move prefix generation into separate mixin