Update reference with ids to attributes for easy linking