update relations json and improve relations widget