remove references to popup
refactored protection code into shared delegate
moved instantiation of current account up, since it missings leads to crash if restore_on_install dialog is shown
refresh menu after template creation