RI functions seem to be working.

Further testing is needed, however. Output formats may change a lot.