Socket handlers on remove, update, create