Factor out unique supply code into its own module.