Move everything back into 1 file (api.php)