cleanup main.pl