Refactoring refresh winMain and refactoring navigation