Move common repository operations to module