core-5294 refactor code
core-5425 allow users to save partially filled metadata template
core-5306 enable top level menus even when no app is selected
merge with repo