cms-2956 Refactor long methods part 2