Better way of creating AJAX forms