Fixed issues between creating and loading state

Moved various calls into render function so that creating and
loadin state does the same thing (add to widgets list, disable
adding map widget), as well as making sure to clear things on
a set state.

Fixes issue with exporting loaded applications (because of widgets
array not being updated).