remove unnecessary elements, use jQuery.ajax