[refs #0001] Wrap stuff up in a mixin. Thanks to @nenadjelovac and @HugoGiraudel.