CFY-644 refactoring