Perl scripts cleaned up