A nasty AJAX/REST example