Api.php file cleanup