RF: continue terryfy refactoring

Continue WIP refactoring to terryfy submodule.

[ci skip]