cleaned rest.php