Split index.php into two files