Revert "Revert "Reimplementing controlled RAF""

This reverts commit 07bb39889a5c305faf5e93008ea80bb043cb49df.