Refactor fetch.hs a bit.