r3, restructured, cleaned