An ugly implementation of the relationship creation and deletion.