CRUDing collection with AJAX