refactoring App class