Enabled Perl::Critic test.

Fixed all parts of the code that failed the Perl::Critic test. This test is recommended when you publish a module to CPAN.