Added reference replacement conversion step