immutable references and a pluggable ref database