reorganized files and set up index.php as a controller