Conform to new API and add support for RI and DSR.