refactoring main App
refactoring main app.