Code refactor using perlcritic recommendations.