Use current value as default value, instead of 0

When we add a new control, the XML does not yet contain a value.
Current version sets the value to 0 by default, but this is not always appropriate.
This patch uses current variable value as default for the control, so it is easy to provide a good default value from the code, just by initializing the variable before loading the xml.