More ref and repo features