Removed AJAX call

Removed the AJAX call so that it now uses api.php hopefully