clean up some more code to satisfy the current perlcritic configuration
revert one of the perlcritic related fixes as this broke some tests
Merge pull request #1317 from szabgab/szabgab/perl-critic

clean up some more code to satisfy the current perlcritic configuration