formatting and cleanup with perlcritic and tidy