Separated out the mixin so it's more readble.