Added .htaccess to the api folder, which removes the need for writing "index.php" in the query, and made changes in the models to accomedate that.