Refactors code to avoid to reset the view controllers every time they are selected from the main menu