You're right that it would be an ordeal to refactor that usage out. But maybe this functions (and the next few that have similar scope) could be easily tweaked to be usable by other tasks, and become the new standard implementations?