Split out price fetching code