split out ScaleInv stuff into its own module