add transaction for deleting references
add transaction to delete - unstable
fix PATCH with references
fix reference issues