updated index.php to include template functions.