Added working AJAX finsih; fixing Javascript