Thank you perl critic

Many small changes in response to Perl::Critic warnings.