clean-up api.php