AJAX rework (#22)