Refactoring App.java