Make the rewriting interface pluggable