Refactor checking/applying of id
Previously, the widgets' values were applied to an element and only
then the widget for the entry/macro id was updated. Now the widget
for the id is checked and updated (e.g. empty ids get restored to
a previous value if that was not empty) and only then all widgets'
values get applied to an element object.