An idea I have for implementing the new system is have the existing buttons always on a toggle on/off mode and introduce one more "render equation" button which looks at which of the "ref" "name" "value" "units" or "x=" buttons are checked and builds the equation based on that.