Template Cleanup

Moved all the templates out of index.php