Removed duplicated code and fit topNavigation changes