Set of utilities and extras for Affiliates plugin by @itthinx