Switch to using refdb