fixed some stuff critiqued by perlcritic