fix perlcritic issues, unused variables