Update to index.php, add logic.php