move templates out of index.pl