Refactor supply implementation