refactored app's structure