CFY-54 general refactoring