Another refactoring to simplify complexity calc.