Completed basic AJAX functionality