Abstract out duplicate resolver code