CFY-1850 more refactoring