Refactor base fetch related functions.