[improv] share code to dom display variant and sum (Save function and Json representation still need to be done)