Update refdb to new API